Feature: Book Genie Mode - Automated Testing with Detailed Reporting
File name: BookGenie.feature
Relative path: features/BookGenie.feature
Scenario Outline: Book Genie Response Validation with Citation Verification
Error: No book data extracted from BookGenie response.
at CustomWorld.(anonymous) (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:46:15)
at /home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:8:71
at __awaiter (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:4:12)
at CustomWorld.(anonymous) (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:59:12)
=== SCENARIO LOGS: Book Genie Response Validation with Citation Verification === [4:48:21 PM] Navigating to Creative Workspace login page [4:48:24 PM] Homepage visibility: false [4:48:24 PM] ℹ️ Clicking on mode selection dropdown [4:48:29 PM] ✅ Mode selection dropdown clicked successfully [4:48:29 PM] ℹ️ Checking visibility of mode: BookGenieQA [4:48:29 PM] ✅ Mode "BookGenieQA" is visible [4:48:29 PM] ℹ️ Selecting mode: BookGenieQA [4:48:29 PM] ✅ Mode "BookGenieQA" selected successfully [4:48:31 PM] ℹ️ Waiting for mode transition to complete [4:48:31 PM] ℹ️ Typing query: "Suggest 5 books on christmas" [4:49:01 PM] ⚠ ⚠Book Genie mode did not loaded [4:49:01 PM] ℹ️ Preparing to type query: "Suggest 5 books on christmas" [4:49:01 PM] ℹ️ Waiting for chat input to be visible [4:49:01 PM] ℹ️ Clearing chat input [4:49:01 PM] ℹ️ Typing query: "Suggest 5 books on christmas" [4:49:02 PM] ℹ️ Pressing Enter to submit query [4:49:02 PM] ✅ Query submitted successfully: "Suggest 5 books on christmas" [4:49:02 PM] ℹ️ Waiting for AI to complete thinking... [4:49:02 PM] 📋 WAITING FOR AI RESPONSE [4:49:02 PM] ℹ️ Looking for AI thinking indicator... [4:49:02 PM] ℹ️ Waiting for thinking indicator to appear (max 2 minutes) [4:49:04 PM] ✅ ✓ AI thinking indicator appeared - AI is processing the request [4:49:04 PM] ℹ️ Waiting for thinking indicator to disappear (max 5 minutes) [4:49:08 PM] ✅ ✓ AI thinking completed - Response should be ready [4:49:08 PM] ℹ️ 🔍 Checking for "None of the above, just" option... [4:49:08 PM] ℹ️ ✓ "None of the above, just" option not present - proceeding normally [4:49:08 PM] ℹ️ Allowing additional time for response rendering [4:49:11 PM] ✅ AI response wait process completed [4:49:11 PM] ℹ️ Validating response for query: "Suggest 5 books on christmas" [4:49:11 PM] 📋 VALIDATING RESPONSE FOR QUERY: "Suggest 5 books on christmas" [4:49:11 PM] ℹ️ Locating the latest response in chat [4:49:11 PM] ℹ️ Waiting for response to be visible (max 30 seconds) [4:49:11 PM] ✅ Response received - Length: 649 characters [4:49:11 PM] ℹ️ Response preview: Watch Me WorkInterpreting context for your query...That sounds like a lovely theme! To help you find... [4:49:11 PM] ℹ️ Extracting book data from response... [4:49:11 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE [4:49:11 PM] ℹ️ Locating BookGenie response container [4:49:11 PM] ℹ️ Extracting HTML content from response [4:49:11 PM] ℹ️ HTML content extracted - Length: 9189 characters [4:49:11 PM] ℹ️ Parsing HTML to extract book data [4:49:11 PM] ✅ SUCCESSFULLY EXTRACTED 0 BOOKS [4:49:11 PM] 📋 EXTRACTED BOOKS SUMMARY [4:49:11 PM] 📊 Total books extracted: 0 [4:49:11 PM] 📊 Average relevance score: 0% [4:49:11 PM] ✅ Extracted 0 books from response === END LOGS ===
Scenario Logs: Book Genie Response Validation with Citation Verification
Scenario Outline: Book Genie Response Validation with Citation Verification
CITATION VALIDATION DETAILED REPORT ================================================================================ BOOK: Math-Ish ------------------------------------------------------------ ❌ Reason 1: FAIL (0%) 📝 Reason: The book highlights the importance of data understanding... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 2: FAIL (0%) 📝 Reason: It emphasizes the necessity of data awareness to combat misinformation, encouraging critical evaluat... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 3: FAIL (0%) 📝 Reason: The book integrates a data postcard activity... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 4: FAIL (0%) 📝 Reason: The book also highlights the importance of data literacy for students to read the world and make sen... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" BOOK: The Cartoon Guide to Statistics ------------------------------------------------------------ ❌ Reason 1: FAIL (0%) 📝 Reason: The book provides a clear and funny illustrated guide to understanding the central ideas of modern s... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 2: FAIL (0%) 📝 Reason: It covers topics such as the summary and display of data, probability, random variables, hypothesis ... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 3: FAIL (0%) 📝 Reason: The guide broadens into the comparison of two distinct populations... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" BOOK: The Joy of x ------------------------------------------------------------ ❌ Reason 1: FAIL (0%) 📝 Reason: The book includes a section on data... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 2: FAIL (0%) 📝 Reason: It references real-world applications in technology like Netflix's algorithms and Google's PageRank,... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 3: FAIL (0%) 📝 Reason: The book explains the big ideas of math gently and clearly, with wit, insight, and brilliant illustr... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" BOOK: LikeWar ------------------------------------------------------------ ❌ Reason 1: FAIL (0%) 📝 Reason: Social media companies are turning to AI... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" ❌ Reason 2: FAIL (0%) 📝 Reason: The book explores how the internet is changing war and politics, and just as war and politics are ch... 📚 Citation: No citation found... ⚠️ Citation text not found in reason: "No citation found" SUMMARY: 0/12 reasons passed (0.0%) OVERALL STATUS: FAIL
Citation validation failed: 0/12 passed (0.0%)
Citation Validation Summary: 0/12 passed
📊 Citation Validation Report
Generated on 10/21/2025, 4:56:06 PM
📖 Math-Ish
📖 The Cartoon Guide to Statistics
📖 The Joy of x
📖 LikeWar
📈 Validation Summary
PER-BOOK AI VALIDATION REPORT - Query: "Suggest 3 books for childrens"
================================================================================
OVERALL RELEVANCE SCORE: 70%
STATUS: FAIL
BOOKS ANALYZED: 4
BOOK 1: "Math-Ish"
------------------------------------------------------------
Overall Score: 70%
SECTION SCORES:
Author Information: 70% - Analysis unavailable - API error
Publishing Date: 70% - Analysis unavailable - API error
Why Match Explanations: 70% - Analysis unavailable - API error
Relevance Scores: 70% - Analysis unavailable - API error
DETAILED FEEDBACK:
• AI analysis temporarily unavailable due to service overload
IMPROVEMENT SUGGESTIONS:
• Retry analysis when service is available
================================================================================
BOOK 2: "The Cartoon Guide to Statistics"
------------------------------------------------------------
Overall Score: 70%
SECTION SCORES:
Author Information: 70% - Analysis unavailable - API error
Publishing Date: 70% - Analysis unavailable - API error
Why Match Explanations: 70% - Analysis unavailable - API error
Relevance Scores: 70% - Analysis unavailable - API error
DETAILED FEEDBACK:
• AI analysis temporarily unavailable due to service overload
IMPROVEMENT SUGGESTIONS:
• Retry analysis when service is available
================================================================================
BOOK 3: "The Joy of x"
------------------------------------------------------------
Overall Score: 70%
SECTION SCORES:
Author Information: 70% - Analysis unavailable - API error
Publishing Date: 70% - Analysis unavailable - API error
Why Match Explanations: 70% - Analysis unavailable - API error
Relevance Scores: 70% - Analysis unavailable - API error
DETAILED FEEDBACK:
• AI analysis temporarily unavailable due to service overload
IMPROVEMENT SUGGESTIONS:
• Retry analysis when service is available
================================================================================
BOOK 4: "LikeWar"
------------------------------------------------------------
Overall Score: 70%
SECTION SCORES:
Author Information: 70% - Analysis unavailable - API error
Publishing Date: 70% - Analysis unavailable - API error
Why Match Explanations: 70% - Analysis unavailable - API error
Relevance Scores: 70% - Analysis unavailable - API error
DETAILED FEEDBACK:
• AI analysis temporarily unavailable due to service overload
IMPROVEMENT SUGGESTIONS:
• Retry analysis when service is available
================================================================================
SUMMARY FEEDBACK:
----------------------------------------
• AI analysis service is temporarily overloaded
• Using fallback analysis with neutral scores
• Error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [429 Too Many Requests] You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.
* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 2
Please retry in 46.080714668s. [{"@type":"type.googleapis.com/google.rpc.QuotaFailure","violations":[{"quotaMetric":"generativelanguage.googleapis.com/generate_content_free_tier_requests","quotaId":"GenerateRequestsPerMinutePerProjectPerModel-FreeTier","quotaDimensions":{"location":"global","model":"gemini-2.5-pro"},"quotaValue":"2"}]},{"@type":"type.googleapis.com/google.rpc.Help","links":[{"description":"Learn more about Gemini API quotas","url":"https://ai.google.dev/gemini-api/docs/rate-limits"}]},{"@type":"type.googleapis.com/google.rpc.RetryInfo","retryDelay":"46s"}]
OVERALL IMPROVEMENT SUGGESTIONS:
----------------------------------------
• Retry the analysis when Gemini API is less busy
• Consider running tests during off-peak hours
• Check Google AI status page for service updates
🤖 PER-BOOK AI Response Relevance Validation
Query: "Suggest 3 books for childrens"
Overall Relevance Score: 70%
Status: FAIL
Books Analyzed: 4
Individual Book Analyses
📖 Book 1: "Math-Ish" - 70%
Author Information: 70%
Analysis unavailable - API error
Publishing Date: 70%
Analysis unavailable - API error
Why Match Explanations: 70%
Analysis unavailable - API error
Relevance Scores: 70%
Analysis unavailable - API error
Improvement Suggestions:
📖 Book 2: "The Cartoon Guide to Statistics" - 70%
Author Information: 70%
Analysis unavailable - API error
Publishing Date: 70%
Analysis unavailable - API error
Why Match Explanations: 70%
Analysis unavailable - API error
Relevance Scores: 70%
Analysis unavailable - API error
Improvement Suggestions:
📖 Book 3: "The Joy of x" - 70%
Author Information: 70%
Analysis unavailable - API error
Publishing Date: 70%
Analysis unavailable - API error
Why Match Explanations: 70%
Analysis unavailable - API error
Relevance Scores: 70%
Analysis unavailable - API error
Improvement Suggestions:
📖 Book 4: "LikeWar" - 70%
Author Information: 70%
Analysis unavailable - API error
Publishing Date: 70%
Analysis unavailable - API error
Why Match Explanations: 70%
Analysis unavailable - API error
Relevance Scores: 70%
Analysis unavailable - API error
Improvement Suggestions:
Summary Feedback
• AI analysis service is temporarily overloaded
• Using fallback analysis with neutral scores
• Error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [429 Too Many Requests] You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 2 Please retry in 46.080714668s. [{"@type":"type.googleapis.com/google.rpc.QuotaFailure","violations":[{"quotaMetric":"generativelanguage.googleapis.com/generate_content_free_tier_requests","quotaId":"GenerateRequestsPerMinutePerProjectPerModel-FreeTier","quotaDimensions":{"location":"global","model":"gemini-2.5-pro"},"quotaValue":"2"}]},{"@type":"type.googleapis.com/google.rpc.Help","links":[{"description":"Learn more about Gemini API quotas","url":"https://ai.google.dev/gemini-api/docs/rate-limits"}]},{"@type":"type.googleapis.com/google.rpc.RetryInfo","retryDelay":"46s"}]
Overall Improvement Suggestions
=== SCENARIO LOGS: Book Genie Response Validation with Citation Verification ===
[4:49:16 PM] Navigating to Creative Workspace login page
[4:49:19 PM] Homepage visibility: false
[4:49:19 PM] ℹ️ Clicking on mode selection dropdown
[4:49:23 PM] ✅ Mode selection dropdown clicked successfully
[4:49:23 PM] ℹ️ Checking visibility of mode: BookGenieQA
[4:49:23 PM] ✅ Mode "BookGenieQA" is visible
[4:49:23 PM] ℹ️ Selecting mode: BookGenieQA
[4:49:23 PM] ✅ Mode "BookGenieQA" selected successfully
[4:49:25 PM] ℹ️ Waiting for mode transition to complete
[4:49:25 PM] ℹ️ Typing query: "Suggest 3 books for childrens"
[4:49:55 PM] ⚠ ⚠Book Genie mode did not loaded
[4:49:55 PM] ℹ️ Preparing to type query: "Suggest 3 books for childrens"
[4:49:55 PM] ℹ️ Waiting for chat input to be visible
[4:49:55 PM] ℹ️ Clearing chat input
[4:49:55 PM] ℹ️ Typing query: "Suggest 3 books for childrens"
[4:49:56 PM] ℹ️ Pressing Enter to submit query
[4:49:57 PM] ✅ Query submitted successfully: "Suggest 3 books for childrens"
[4:49:57 PM] ℹ️ Waiting for AI to complete thinking...
[4:49:57 PM] 📋 WAITING FOR AI RESPONSE
[4:49:57 PM] ℹ️ Looking for AI thinking indicator...
[4:49:57 PM] ℹ️ Waiting for thinking indicator to appear (max 2 minutes)
[4:49:58 PM] ✅ ✓ AI thinking indicator appeared - AI is processing the request
[4:49:58 PM] ℹ️ Waiting for thinking indicator to disappear (max 5 minutes)
[4:50:10 PM] ✅ ✓ AI thinking completed - Response should be ready
[4:50:10 PM] ℹ️ 🔍 Checking for "None of the above, just" option...
[4:50:10 PM] ℹ️ ✓ "None of the above, just" option not present - proceeding normally
[4:50:10 PM] ℹ️ Allowing additional time for response rendering
[4:50:13 PM] ✅ AI response wait process completed
[4:50:13 PM] ℹ️ Validating response for query: "Suggest 3 books for childrens"
[4:50:13 PM] 📋 VALIDATING RESPONSE FOR QUERY: "Suggest 3 books for childrens"
[4:50:13 PM] ℹ️ Locating the latest response in chat
[4:50:13 PM] ℹ️ Waiting for response to be visible (max 30 seconds)
[4:50:13 PM] ✅ Response received - Length: 4064 characters
[4:50:13 PM] ℹ️ Response preview: Watch Me WorkRetrieving Relevant Books for 'books for children' in Book Summary ...Retrieving Releva...
[4:50:13 PM] ℹ️ Extracting book data from response...
[4:50:13 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE
[4:50:13 PM] ℹ️ Locating BookGenie response container
[4:50:13 PM] ℹ️ Extracting HTML content from response
[4:50:13 PM] ℹ️ HTML content extracted - Length: 33852 characters
[4:50:13 PM] ℹ️ Parsing HTML to extract book data
[4:50:13 PM] ✅ SUCCESSFULLY EXTRACTED 4 BOOKS
[4:50:13 PM] 📋 EXTRACTED BOOKS SUMMARY
[4:50:13 PM] 📚 1. "Math-Ish" - Score: 95%%
[4:50:13 PM] 📚 2. "The Cartoon Guide to Statistics" - Score: 92%%
[4:50:13 PM] 📚 3. "The Joy of x" - Score: 88%%
[4:50:13 PM] 📚 4. "LikeWar" - Score: 65%%
[4:50:13 PM] 📊 Total books extracted: 4
[4:50:13 PM] 📊 Average relevance score: 85%
[4:50:13 PM] ✅ Extracted 4 books from response
[4:50:13 PM] ℹ️ Saving 4 books to Excel file: test_results/suggest_3_books_for_childrens.xlsx
[4:50:13 PM] 📋 SAVING BOOKS TO EXCEL FILE
[4:50:13 PM] ℹ️ Target file path: test_results/suggest_3_books_for_childrens.xlsx
[4:50:13 PM] ℹ️ Exporting 4 books to Excel format
[4:50:13 PM] ✅ Book data saved to: test_results/suggest_3_books_for_childrens.xlsx
[4:50:13 PM] 📊 File verified - Size: 18.31 KB
[4:50:13 PM] ✅ ✓ Excel file creation verified successfully
[4:50:13 PM] 📋 STARTING INDIVIDUAL BOOK VALIDATION (4 books) for query: "Suggest 3 books for childrens"
[4:50:13 PM] 📋 📚 VALIDATING BOOK 1: "Math-Ish"
[4:50:13 PM] ℹ️ Starting comprehensive book validation
[4:50:13 PM] ℹ️ Validating title: "Math-Ish" vs expected: "Math-Ish"
[4:50:13 PM] ✅ ✅ TITLE VALIDATION PASSED: "Math-Ish"
[4:50:13 PM] ℹ️ Validating score: 95% vs expected: 95%
[4:50:13 PM] ✅ ✅ SCORE VALIDATION PASSED: 95% (expected 95%)
[4:50:13 PM] ℹ️ Gap similarity calculated: 100.0%
[4:50:13 PM] ✅ ✅ GAP VALIDATION PASSED: Similarity 100.0%
[4:50:13 PM] ℹ️ Why-match points: extracted 4 vs expected 4
[4:50:13 PM] ✅ ✅ WHY-MATCH VALIDATION PASSED: 4 points (expected 4)
[4:50:13 PM] ✅ 🎉 BOOK 1 VALIDATION: ALL CHECKS PASSED!
[4:50:13 PM] ℹ️ Book 1 validation completed
[4:50:13 PM] 📋 📚 VALIDATING BOOK 2: "The Cartoon Guide to Statistics"
[4:50:13 PM] ℹ️ Starting comprehensive book validation
[4:50:13 PM] ℹ️ Validating title: "The Cartoon Guide to Statistics" vs expected: "The Cartoon Guide to Statistics"
[4:50:13 PM] ✅ ✅ TITLE VALIDATION PASSED: "The Cartoon Guide to Statistics"
[4:50:13 PM] ℹ️ Validating score: 92% vs expected: 92%
[4:50:13 PM] ✅ ✅ SCORE VALIDATION PASSED: 92% (expected 92%)
[4:50:13 PM] ℹ️ Gap similarity calculated: 100.0%
[4:50:13 PM] ✅ ✅ GAP VALIDATION PASSED: Similarity 100.0%
[4:50:13 PM] ℹ️ Why-match points: extracted 3 vs expected 3
[4:50:13 PM] ✅ ✅ WHY-MATCH VALIDATION PASSED: 3 points (expected 3)
[4:50:13 PM] ✅ 🎉 BOOK 2 VALIDATION: ALL CHECKS PASSED!
[4:50:13 PM] ℹ️ Book 2 validation completed
[4:50:13 PM] 📋 📚 VALIDATING BOOK 3: "The Joy of x"
[4:50:13 PM] ℹ️ Starting comprehensive book validation
[4:50:13 PM] ℹ️ Validating title: "The Joy of x" vs expected: "The Joy of x"
[4:50:13 PM] ✅ ✅ TITLE VALIDATION PASSED: "The Joy of x"
[4:50:13 PM] ℹ️ Validating score: 88% vs expected: 88%
[4:50:13 PM] ✅ ✅ SCORE VALIDATION PASSED: 88% (expected 88%)
[4:50:13 PM] ℹ️ Gap similarity calculated: 100.0%
[4:50:13 PM] ✅ ✅ GAP VALIDATION PASSED: Similarity 100.0%
[4:50:13 PM] ℹ️ Why-match points: extracted 3 vs expected 3
[4:50:13 PM] ✅ ✅ WHY-MATCH VALIDATION PASSED: 3 points (expected 3)
[4:50:13 PM] ✅ 🎉 BOOK 3 VALIDATION: ALL CHECKS PASSED!
[4:50:13 PM] ℹ️ Book 3 validation completed
[4:50:13 PM] 📋 📚 VALIDATING BOOK 4: "LikeWar"
[4:50:13 PM] ℹ️ Starting comprehensive book validation
[4:50:13 PM] ℹ️ Validating title: "LikeWar" vs expected: "LikeWar"
[4:50:13 PM] ✅ ✅ TITLE VALIDATION PASSED: "LikeWar"
[4:50:13 PM] ℹ️ Validating score: 65% vs expected: 65%
[4:50:13 PM] ✅ ✅ SCORE VALIDATION PASSED: 65% (expected 65%)
[4:50:13 PM] ℹ️ ℹ️ GAP VALIDATION SKIPPED: No gap expected in reference data
[4:50:13 PM] ℹ️ Why-match points: extracted 2 vs expected 2
[4:50:13 PM] ✅ ✅ WHY-MATCH VALIDATION PASSED: 2 points (expected 2)
[4:50:13 PM] ✅ 🎉 BOOK 4 VALIDATION: ALL CHECKS PASSED!
[4:50:13 PM] ℹ️ Book 4 validation completed
[4:50:13 PM] 📊 VALIDATION SUMMARY: 4/4 books passed
[4:50:13 PM] ✅ ALL BOOKS VALIDATED SUCCESSFULLY!
[4:50:13 PM] 📋 🔍 VALIDATING REASON-CITATION MATCHES
[4:50:13 PM] ℹ️ Starting citation validation process...
[4:50:13 PM] 📋 🚀 STARTING COMPLETE CITATION VALIDATION WORKFLOW
[4:50:13 PM] ℹ️ Step 1: Extracting books from AI response
[4:50:13 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE
[4:50:13 PM] ℹ️ Locating BookGenie response container
[4:50:13 PM] ℹ️ Extracting HTML content from response
[4:50:13 PM] ℹ️ HTML content extracted - Length: 33852 characters
[4:50:13 PM] ℹ️ Parsing HTML to extract book data
[4:50:13 PM] ✅ SUCCESSFULLY EXTRACTED 4 BOOKS
[4:50:13 PM] 📋 EXTRACTED BOOKS SUMMARY
[4:50:13 PM] 📚 1. "Math-Ish" - Score: 95%%
[4:50:13 PM] 📚 2. "The Cartoon Guide to Statistics" - Score: 92%%
[4:50:13 PM] 📚 3. "The Joy of x" - Score: 88%%
[4:50:13 PM] 📚 4. "LikeWar" - Score: 65%%
[4:50:13 PM] 📊 Total books extracted: 4
[4:50:13 PM] 📊 Average relevance score: 85%
[4:50:13 PM] ℹ️ Step 2: Extracting citation texts from book elements
[4:50:13 PM] 📋 📚 EXTRACTING CITATION TEXTS FROM BOOK ELEMENTS
[4:50:13 PM] ℹ️ Step 1: Waiting for main book section
[4:50:13 PM] ℹ️ Found 21 total accordion sections
[4:50:13 PM] ℹ️ Found individual book: "1. The Art of Talking with Children"
[4:50:13 PM] ℹ️ Found individual book: "2. A Christmas Carol"
[4:50:13 PM] ℹ️ Found individual book: "3. A Series of Unfortunate Events #1: The Bad Beginning"
[4:50:13 PM] ℹ️ Found individual book: "1. Math-Ish"
[4:50:13 PM] ℹ️ Found individual book: "2. The Cartoon Guide to Statistics"
[4:50:13 PM] ℹ️ Found individual book: "3. The Joy of x"
[4:50:13 PM] ℹ️ Found individual book: "1. LikeWar"
[4:50:13 PM] ℹ️ Processing 7 individual book sections
[4:50:13 PM] 📋 📖 PROCESSING BOOK 1: "The Art of Talking with Children"
[4:50:13 PM] ℹ️ Expanding book section: "The Art of Talking with Children"
[4:50:16 PM] ✅ Book section expanded: "The Art of Talking with Children"
[4:50:16 PM] ℹ️ Expanding "Why this book is the match" section for: "The Art of Talking with Children"
[4:50:19 PM] ✅ "Why this book is the match" section expanded for: "The Art of Talking with Children"
[4:50:19 PM] ℹ️ Found 4 citation buttons for "The Art of Talking with Children"
[4:50:19 PM] ℹ️ Extracting citation 1/4 for "The Art of Talking with Children"
[4:50:19 PM] ℹ️ Processing metadata citation 1 for "The Art of Talking with Children"
[4:50:20 PM] ℹ️ Clicking to OPEN metadata citation 1
[4:50:22 PM] ℹ️ Extracted citation text (first 100 chars): gives readers evidence-based tools and techniques to communicate more effectively with children...
[4:50:22 PM] ℹ️ Clicking to CLOSE metadata citation 1
[4:50:24 PM] ✅ ✅ metadata citation 1 closed successfully
[4:50:24 PM] ℹ️ ✅ Citation 1 extracted successfully (length: 95)
[4:50:24 PM] ℹ️ Extracting citation 2/4 for "The Art of Talking with Children"
[4:50:24 PM] ℹ️ Processing metadata citation 2 for "The Art of Talking with Children"
[4:50:25 PM] ℹ️ Clicking to OPEN metadata citation 2
[4:50:27 PM] ℹ️ Extracted citation text (first 100 chars): have productive and meaningful conversations...
[4:50:27 PM] ℹ️ Clicking to CLOSE metadata citation 2
[4:50:28 PM] ✅ ✅ metadata citation 2 closed successfully
[4:50:28 PM] ℹ️ ✅ Citation 2 extracted successfully (length: 44)
[4:50:28 PM] ℹ️ Extracting citation 3/4 for "The Art of Talking with Children"
[4:50:28 PM] ℹ️ Processing metadata citation 3 for "The Art of Talking with Children"
[4:50:30 PM] ℹ️ Clicking to OPEN metadata citation 3
[4:50:32 PM] ℹ️ Extracted citation text (first 100 chars): can help us build the skills and capacities children need to thrive...
[4:50:32 PM] ℹ️ Clicking to CLOSE metadata citation 3
[4:50:33 PM] ✅ ✅ metadata citation 3 closed successfully
[4:50:33 PM] ℹ️ ✅ Citation 3 extracted successfully (length: 67)
[4:50:33 PM] ℹ️ Extracting citation 4/4 for "The Art of Talking with Children"
[4:50:33 PM] ℹ️ Processing manuscript citation 4 for "The Art of Talking with Children"
[4:50:34 PM] ℹ️ Clicking to OPEN manuscript citation 4
[4:50:36 PM] ℹ️ Extracted citation text (first 100 chars): practical guidance for parents...
[4:50:36 PM] ℹ️ Clicking to CLOSE manuscript citation 4
[4:50:38 PM] ✅ ✅ manuscript citation 4 closed successfully
[4:50:38 PM] ℹ️ ✅ Citation 4 extracted successfully (length: 30)
[4:50:38 PM] ℹ️ Collapsing book section: "The Art of Talking with Children"
[4:50:39 PM] ✅ Book section collapsed: "The Art of Talking with Children"
[4:50:39 PM] ✅ ✅ Completed processing "The Art of Talking with Children" - 4 citations extracted
[4:50:39 PM] 📋 📖 PROCESSING BOOK 2: "A Christmas Carol"
[4:50:39 PM] ℹ️ Expanding book section: "A Christmas Carol"
[4:50:42 PM] ✅ Book section expanded: "A Christmas Carol"
[4:50:42 PM] ℹ️ Expanding "Why this book is the match" section for: "A Christmas Carol"
[4:50:45 PM] ✅ "Why this book is the match" section expanded for: "A Christmas Carol"
[4:50:45 PM] ℹ️ Found 5 citation buttons for "A Christmas Carol"
[4:50:45 PM] ℹ️ Extracting citation 1/5 for "A Christmas Carol"
[4:50:45 PM] ℹ️ Processing metadata citation 1 for "A Christmas Carol"
[4:50:47 PM] ℹ️ Clicking to OPEN metadata citation 1
[4:50:49 PM] ℹ️ Extracted citation text (first 100 chars): Book Title: A Christmas Carol Complete Text...
[4:50:49 PM] ℹ️ Clicking to CLOSE metadata citation 1
[4:50:50 PM] ✅ ✅ metadata citation 1 closed successfully
[4:50:50 PM] ℹ️ ✅ Citation 1 extracted successfully (length: 43)
[4:50:50 PM] ℹ️ Extracting citation 2/5 for "A Christmas Carol"
[4:50:50 PM] ℹ️ Processing metadata citation 2 for "A Christmas Carol"
[4:50:51 PM] ℹ️ Clicking to OPEN metadata citation 2
[4:50:53 PM] ℹ️ Extracted citation text (first 100 chars): Scrooge’s heart to kindness and charity...
[4:50:53 PM] ℹ️ Clicking to CLOSE metadata citation 2
[4:50:55 PM] ✅ ✅ metadata citation 2 closed successfully
[4:50:55 PM] ℹ️ ✅ Citation 2 extracted successfully (length: 39)
[4:50:55 PM] ℹ️ Extracting citation 3/5 for "A Christmas Carol"
[4:50:55 PM] ℹ️ Processing metadata citation 3 for "A Christmas Carol"
[4:50:56 PM] ℹ️ Clicking to OPEN metadata citation 3
[4:50:58 PM] ℹ️ Extracted citation text (first 100 chars): JUVENILE FICTION: Activity Books / Coloring...
[4:50:58 PM] ℹ️ Clicking to CLOSE metadata citation 3
[4:50:59 PM] ✅ ✅ metadata citation 3 closed successfully
[4:50:59 PM] ℹ️ ✅ Citation 3 extracted successfully (length: 43)
[4:50:59 PM] ℹ️ Extracting citation 4/5 for "A Christmas Carol"
[4:50:59 PM] ℹ️ Processing metadata citation 4 for "A Christmas Carol"
[4:51:00 PM] ℹ️ Clicking to OPEN metadata citation 4
[4:51:02 PM] ℹ️ Extracted citation text (first 100 chars): JUVENILE FICTION: Ghost Stories *...
[4:51:02 PM] ℹ️ Clicking to CLOSE metadata citation 4
[4:51:04 PM] ✅ ✅ metadata citation 4 closed successfully
[4:51:04 PM] ℹ️ ✅ Citation 4 extracted successfully (length: 33)
[4:51:04 PM] ℹ️ Extracting citation 5/5 for "A Christmas Carol"
[4:51:04 PM] ℹ️ Processing metadata citation 5 for "A Christmas Carol"
[4:51:05 PM] ℹ️ Clicking to OPEN metadata citation 5
[4:51:07 PM] ℹ️ Extracted citation text (first 100 chars): classic literature...
[4:51:07 PM] ℹ️ Clicking to CLOSE metadata citation 5
[4:51:08 PM] ✅ ✅ metadata citation 5 closed successfully
[4:51:08 PM] ℹ️ ✅ Citation 5 extracted successfully (length: 18)
[4:51:08 PM] ℹ️ Collapsing book section: "A Christmas Carol"
[4:51:10 PM] ✅ Book section collapsed: "A Christmas Carol"
[4:51:10 PM] ✅ ✅ Completed processing "A Christmas Carol" - 5 citations extracted
[4:51:10 PM] 📋 📖 PROCESSING BOOK 3: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:10 PM] ℹ️ Expanding book section: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:13 PM] ✅ Book section expanded: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:13 PM] ℹ️ Expanding "Why this book is the match" section for: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:16 PM] ✅ "Why this book is the match" section expanded for: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:16 PM] ℹ️ Found 4 citation buttons for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:16 PM] ℹ️ Extracting citation 1/4 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:16 PM] ℹ️ Processing metadata citation 1 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:17 PM] ℹ️ Clicking to OPEN metadata citation 1
[4:51:19 PM] ℹ️ Extracted citation text (first 100 chars): books for children...
[4:51:19 PM] ℹ️ Clicking to CLOSE metadata citation 1
[4:51:21 PM] ✅ ✅ metadata citation 1 closed successfully
[4:51:21 PM] ℹ️ ✅ Citation 1 extracted successfully (length: 18)
[4:51:21 PM] ℹ️ Extracting citation 2/4 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:21 PM] ℹ️ Processing metadata citation 2 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:22 PM] ℹ️ Clicking to OPEN metadata citation 2
[4:51:24 PM] ℹ️ Extracted citation text (first 100 chars): JUVENILE FICTION: Humorous Stories...
[4:51:24 PM] ℹ️ Clicking to CLOSE metadata citation 2
[4:51:25 PM] ✅ ✅ metadata citation 2 closed successfully
[4:51:25 PM] ℹ️ ✅ Citation 2 extracted successfully (length: 34)
[4:51:25 PM] ℹ️ Extracting citation 3/4 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:25 PM] ℹ️ Processing metadata citation 3 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:26 PM] ℹ️ Clicking to OPEN metadata citation 3
[4:51:28 PM] ℹ️ Extracted citation text (first 100 chars): JUVENILE FICTION: Mysteries & Detective Stories...
[4:51:28 PM] ℹ️ Clicking to CLOSE metadata citation 3
[4:51:30 PM] ✅ ✅ metadata citation 3 closed successfully
[4:51:30 PM] ℹ️ ✅ Citation 3 extracted successfully (length: 47)
[4:51:30 PM] ℹ️ Extracting citation 4/4 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:30 PM] ℹ️ Processing metadata citation 4 for "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:31 PM] ℹ️ Clicking to OPEN metadata citation 4
[4:51:33 PM] ℹ️ Extracted citation text (first 100 chars): JUVENILE FICTION: Action & Adventure / General...
[4:51:33 PM] ℹ️ Clicking to CLOSE metadata citation 4
[4:51:35 PM] ✅ ✅ metadata citation 4 closed successfully
[4:51:35 PM] ℹ️ ✅ Citation 4 extracted successfully (length: 46)
[4:51:35 PM] ℹ️ Collapsing book section: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:36 PM] ✅ Book section collapsed: "A Series of Unfortunate Events #1: The Bad Beginning"
[4:51:36 PM] ✅ ✅ Completed processing "A Series of Unfortunate Events #1: The Bad Beginning" - 4 citations extracted
[4:51:36 PM] 📋 📖 PROCESSING BOOK 4: "Math-Ish"
[4:51:36 PM] ℹ️ Expanding book section: "Math-Ish"
[4:51:39 PM] ✅ Book section expanded: "Math-Ish"
[4:51:39 PM] ℹ️ "Why this book is the match" section already expanded for: "Math-Ish"
[4:51:39 PM] ℹ️ Found 4 citation buttons for "Math-Ish"
[4:51:39 PM] ℹ️ Extracting citation 1/4 for "Math-Ish"
[4:51:39 PM] ℹ️ Processing manuscript citation 1 for "Math-Ish"
[4:51:40 PM] ℹ️ Clicking to OPEN manuscript citation 1
[4:51:52 PM] ❌ Error extracting citation 1 for "Math-Ish": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:51:52 PM] ⚠ ⚠️ Citation 1 extraction failed or returned empty
[4:51:52 PM] ℹ️ Extracting citation 2/4 for "Math-Ish"
[4:51:52 PM] ℹ️ Processing manuscript citation 2 for "Math-Ish"
[4:51:53 PM] ℹ️ Clicking to OPEN manuscript citation 2
[4:52:05 PM] ❌ Error extracting citation 2 for "Math-Ish": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:52:05 PM] ⚠ ⚠️ Citation 2 extraction failed or returned empty
[4:52:05 PM] ℹ️ Extracting citation 3/4 for "Math-Ish"
[4:52:05 PM] ℹ️ Processing manuscript citation 3 for "Math-Ish"
[4:52:06 PM] ℹ️ Clicking to OPEN manuscript citation 3
[4:52:18 PM] ❌ Error extracting citation 3 for "Math-Ish": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:52:18 PM] ⚠ ⚠️ Citation 3 extraction failed or returned empty
[4:52:18 PM] ℹ️ Extracting citation 4/4 for "Math-Ish"
[4:52:18 PM] ℹ️ Processing manuscript citation 4 for "Math-Ish"
[4:52:19 PM] ℹ️ Clicking to OPEN manuscript citation 4
[4:52:31 PM] ❌ Error extracting citation 4 for "Math-Ish": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:52:31 PM] ⚠ ⚠️ Citation 4 extraction failed or returned empty
[4:52:31 PM] ℹ️ Collapsing book section: "Math-Ish"
[4:52:33 PM] ✅ Book section collapsed: "Math-Ish"
[4:52:33 PM] ✅ ✅ Completed processing "Math-Ish" - 0 citations extracted
[4:52:33 PM] 📋 📖 PROCESSING BOOK 5: "The Cartoon Guide to Statistics"
[4:52:33 PM] ℹ️ Expanding book section: "The Cartoon Guide to Statistics"
[4:52:36 PM] ✅ Book section expanded: "The Cartoon Guide to Statistics"
[4:52:36 PM] ℹ️ "Why this book is the match" section already expanded for: "The Cartoon Guide to Statistics"
[4:52:36 PM] ℹ️ Found 3 citation buttons for "The Cartoon Guide to Statistics"
[4:52:36 PM] ℹ️ Extracting citation 1/3 for "The Cartoon Guide to Statistics"
[4:52:36 PM] ℹ️ Processing metadata citation 1 for "The Cartoon Guide to Statistics"
[4:52:37 PM] ℹ️ Clicking to OPEN metadata citation 1
[4:52:49 PM] ❌ Error extracting citation 1 for "The Cartoon Guide to Statistics": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:52:49 PM] ⚠ ⚠️ Citation 1 extraction failed or returned empty
[4:52:49 PM] ℹ️ Extracting citation 2/3 for "The Cartoon Guide to Statistics"
[4:52:49 PM] ℹ️ Processing metadata citation 2 for "The Cartoon Guide to Statistics"
[4:52:50 PM] ℹ️ Clicking to OPEN metadata citation 2
[4:53:02 PM] ❌ Error extracting citation 2 for "The Cartoon Guide to Statistics": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:53:02 PM] ⚠ ⚠️ Citation 2 extraction failed or returned empty
[4:53:02 PM] ℹ️ Extracting citation 3/3 for "The Cartoon Guide to Statistics"
[4:53:02 PM] ℹ️ Processing manuscript citation 3 for "The Cartoon Guide to Statistics"
[4:53:03 PM] ℹ️ Clicking to OPEN manuscript citation 3
[4:53:15 PM] ❌ Error extracting citation 3 for "The Cartoon Guide to Statistics": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:53:15 PM] ⚠ ⚠️ Citation 3 extraction failed or returned empty
[4:53:15 PM] ℹ️ Collapsing book section: "The Cartoon Guide to Statistics"
[4:53:17 PM] ✅ Book section collapsed: "The Cartoon Guide to Statistics"
[4:53:17 PM] ✅ ✅ Completed processing "The Cartoon Guide to Statistics" - 0 citations extracted
[4:53:17 PM] 📋 📖 PROCESSING BOOK 6: "The Joy of x"
[4:53:17 PM] ℹ️ Expanding book section: "The Joy of x"
[4:53:20 PM] ✅ Book section expanded: "The Joy of x"
[4:53:20 PM] ℹ️ "Why this book is the match" section already expanded for: "The Joy of x"
[4:53:20 PM] ℹ️ Found 3 citation buttons for "The Joy of x"
[4:53:20 PM] ℹ️ Extracting citation 1/3 for "The Joy of x"
[4:53:20 PM] ℹ️ Processing manuscript citation 1 for "The Joy of x"
[4:53:21 PM] ℹ️ Clicking to OPEN manuscript citation 1
[4:53:33 PM] ❌ Error extracting citation 1 for "The Joy of x": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:53:33 PM] ⚠ ⚠️ Citation 1 extraction failed or returned empty
[4:53:33 PM] ℹ️ Extracting citation 2/3 for "The Joy of x"
[4:53:33 PM] ℹ️ Processing manuscript citation 2 for "The Joy of x"
[4:53:34 PM] ℹ️ Clicking to OPEN manuscript citation 2
[4:53:46 PM] ❌ Error extracting citation 2 for "The Joy of x": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:53:46 PM] ⚠ ⚠️ Citation 2 extraction failed or returned empty
[4:53:46 PM] ℹ️ Extracting citation 3/3 for "The Joy of x"
[4:53:46 PM] ℹ️ Processing metadata citation 3 for "The Joy of x"
[4:53:47 PM] ℹ️ Clicking to OPEN metadata citation 3
[4:53:59 PM] ❌ Error extracting citation 3 for "The Joy of x": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:53:59 PM] ⚠ ⚠️ Citation 3 extraction failed or returned empty
[4:53:59 PM] ℹ️ Collapsing book section: "The Joy of x"
[4:54:01 PM] ✅ Book section collapsed: "The Joy of x"
[4:54:01 PM] ✅ ✅ Completed processing "The Joy of x" - 0 citations extracted
[4:54:01 PM] 📋 📖 PROCESSING BOOK 7: "LikeWar"
[4:54:01 PM] ℹ️ Expanding book section: "LikeWar"
[4:54:04 PM] ✅ Book section expanded: "LikeWar"
[4:54:04 PM] ℹ️ "Why this book is the match" section already expanded for: "LikeWar"
[4:54:04 PM] ℹ️ Found 2 citation buttons for "LikeWar"
[4:54:04 PM] ℹ️ Extracting citation 1/2 for "LikeWar"
[4:54:04 PM] ℹ️ Processing manuscript citation 1 for "LikeWar"
[4:54:05 PM] ℹ️ Clicking to OPEN manuscript citation 1
[4:54:17 PM] ❌ Error extracting citation 1 for "LikeWar": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:54:17 PM] ⚠ ⚠️ Citation 1 extraction failed or returned empty
[4:54:17 PM] ℹ️ Extracting citation 2/2 for "LikeWar"
[4:54:17 PM] ℹ️ Processing metadata citation 2 for "LikeWar"
[4:54:18 PM] ℹ️ Clicking to OPEN metadata citation 2
[4:54:30 PM] ❌ Error extracting citation 2 for "LikeWar": TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('[class*="BookCitation-module_paragraph"] span[id*="quotes-citations"]').first() to be visible
[4:54:30 PM] ⚠ ⚠️ Citation 2 extraction failed or returned empty
[4:54:30 PM] ℹ️ Collapsing book section: "LikeWar"
[4:54:32 PM] ✅ Book section collapsed: "LikeWar"
[4:54:32 PM] ✅ ✅ Completed processing "LikeWar" - 0 citations extracted
[4:54:32 PM] ✅ 🎉 Successfully extracted citations from 7 books
[4:54:32 PM] ℹ️ Step 3: Validating reason-citation matches
[4:54:32 PM] 📋 🔍 VALIDATING REASON-CITATION MATCHES (80% THRESHOLD)
[4:54:32 PM] ℹ️ 📖 Validating 4 reasons for: "Math-Ish"
[4:54:32 PM] ℹ️ Reason 1: Checking match...
[4:54:58 PM] ❌ ❌ "Math-Ish" - Reason 1: 0% match - FAIL
[4:54:58 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:54:58 PM] ℹ️ Reason 2: Checking match...
[4:55:08 PM] ❌ ❌ "Math-Ish" - Reason 2: 0% match - FAIL
[4:55:08 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:08 PM] ℹ️ Reason 3: Checking match...
[4:55:17 PM] ❌ ❌ "Math-Ish" - Reason 3: 0% match - FAIL
[4:55:17 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:17 PM] ℹ️ Reason 4: Checking match...
[4:55:17 PM] ❌ ❌ "Math-Ish" - Reason 4: 0% match - FAIL
[4:55:17 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:17 PM] ℹ️ 📖 Validating 3 reasons for: "The Cartoon Guide to Statistics"
[4:55:17 PM] ℹ️ Reason 1: Checking match...
[4:55:18 PM] ❌ ❌ "The Cartoon Guide to Statistics" - Reason 1: 0% match - FAIL
[4:55:18 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:18 PM] ℹ️ Reason 2: Checking match...
[4:55:19 PM] ❌ ❌ "The Cartoon Guide to Statistics" - Reason 2: 0% match - FAIL
[4:55:19 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:19 PM] ℹ️ Reason 3: Checking match...
[4:55:36 PM] ❌ ❌ "The Cartoon Guide to Statistics" - Reason 3: 0% match - FAIL
[4:55:36 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:36 PM] ℹ️ 📖 Validating 3 reasons for: "The Joy of x"
[4:55:36 PM] ℹ️ Reason 1: Checking match...
[4:55:36 PM] ❌ ❌ "The Joy of x" - Reason 1: 0% match - FAIL
[4:55:36 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:36 PM] ℹ️ Reason 2: Checking match...
[4:55:36 PM] ❌ ❌ "The Joy of x" - Reason 2: 0% match - FAIL
[4:55:36 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:36 PM] ℹ️ Reason 3: Checking match...
[4:55:37 PM] ❌ ❌ "The Joy of x" - Reason 3: 0% match - FAIL
[4:55:37 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:55:37 PM] ℹ️ 📖 Validating 2 reasons for: "LikeWar"
[4:55:37 PM] ℹ️ Reason 1: Checking match...
[4:56:06 PM] ❌ ❌ "LikeWar" - Reason 1: 0% match - FAIL
[4:56:06 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:56:06 PM] ℹ️ Reason 2: Checking match...
[4:56:06 PM] ❌ ❌ "LikeWar" - Reason 2: 0% match - FAIL
[4:56:06 PM] ❌ ⚠️ Citation text not found in reason: "No citation found"
[4:56:06 PM] 📊 📊 CITATION VALIDATION SUMMARY: 0/12 passed (0.0%)
[4:56:06 PM] ❌ 💥 REASON-CITATION VALIDATION: OVERALL FAILED
[4:56:06 PM] ℹ️ Step 4: Generating detailed report
[4:56:06 PM] 📋 📋 GENERATING CITATION VALIDATION REPORT
[4:56:06 PM] ℹ️ Report generated: 0/12 reasons passed
[4:56:06 PM] ✅ ✅ Citation validation workflow completed successfully
[4:56:06 PM] 📊 📈 OVERALL CITATION VALIDATION: 0/12 (0.0%)
[4:56:06 PM] ❌ ❌ REASON-CITATION VALIDATION: OVERALL FAILED - Only 0.0% of reasons match citations (required: 80%)
[4:56:06 PM] 📋 📋 GENERATING DETAILED CITATION VALIDATION REPORT
[4:56:06 PM] ℹ️ Generating HTML citation validation report
[4:56:06 PM] ✅ Generated HTML report for 12 reasons
[4:56:06 PM] ✅ ✅ Citation validation HTML report generated and attached
[4:56:06 PM] ✅ ✅ Citation validation plain text report attached
[4:56:06 PM] ℹ️ Checking database connectivity...
[4:56:06 PM] ✅ ✅ Database connected successfully
[4:56:06 PM] ℹ️ Database path: /home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/test_data/database.xlsx
[4:56:06 PM] ℹ️ Total books: 10032
[4:56:06 PM] 📊 Database contains 10032 books
[4:56:06 PM] ✅ ✅ Database book count requirement met: 10032 >= 10032
[4:56:06 PM] 📋 🔍 VALIDATING EXTRACTED BOOKS INDIVIDUALLY AGAINST DATABASE
[4:56:06 PM] ℹ️ Checking book 1/4: "Math-Ish"
[4:56:06 PM] ℹ️ Checking if book exists in database: "Math-Ish"
[4:56:07 PM] ✅ ✅ Database match: "Math-Ish" → "Math-Ish"
[4:56:07 PM] ℹ️ Checking book 2/4: "The Cartoon Guide to Statistics"
[4:56:07 PM] ℹ️ Checking if book exists in database: "The Cartoon Guide to Statistics"
[4:56:07 PM] ✅ ✅ Database match: "The Cartoon Guide to Statistics" → "The Cartoon Guide to Statistics"
[4:56:07 PM] ℹ️ Checking book 3/4: "The Joy of x"
[4:56:07 PM] ℹ️ Checking if book exists in database: "The Joy of x"
[4:56:07 PM] ✅ ✅ Database match: "The Joy of x" → "The Joy of x"
[4:56:07 PM] ℹ️ Checking book 4/4: "LikeWar"
[4:56:07 PM] ℹ️ Checking if book exists in database: "LikeWar"
[4:56:07 PM] ✅ ✅ Database match: "LikeWar" → "LikeWar"
[4:56:07 PM] 📊 INDIVIDUAL DATABASE VALIDATION SUMMARY: 4/4 books found in database
[4:56:07 PM] ✅ 🎉 ALL BOOKS VALIDATED SUCCESSFULLY AGAINST DATABASE!
[4:56:07 PM] 📋 🤖 VALIDATING RESPONSE RELEVANCE WITH GEMINI AI - PER BOOK ANALYSIS
[4:56:07 PM] ℹ️ Starting Gemini AI per-book relevance validation...
[4:56:07 PM] 📋 🤖 ANALYZING RESPONSE RELEVANCE WITH GEMINI AI - PER BOOK ANALYSIS
[4:56:07 PM] ℹ️ Starting Gemini AI analysis with retry logic...
[4:56:13 PM] ⚠ ⚠️ GEMINI VALIDATION: Using fallback analysis due to API issues
[4:56:13 PM] ℹ️ Overall Score: 70% (Fallback)
[4:56:13 PM] 📋 📖 ANALYSIS FOR: "Math-Ish" - Score: 70%
[4:56:13 PM] ℹ️ ❌ Author Information: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Publishing Date: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Why Match Explanations: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Relevance Scores: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ 💡 Book-specific improvements:
[4:56:13 PM] ℹ️ - Retry analysis when service is available
[4:56:13 PM] 📋 📖 ANALYSIS FOR: "The Cartoon Guide to Statistics" - Score: 70%
[4:56:13 PM] ℹ️ ❌ Author Information: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Publishing Date: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Why Match Explanations: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Relevance Scores: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ 💡 Book-specific improvements:
[4:56:13 PM] ℹ️ - Retry analysis when service is available
[4:56:13 PM] 📋 📖 ANALYSIS FOR: "The Joy of x" - Score: 70%
[4:56:13 PM] ℹ️ ❌ Author Information: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Publishing Date: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Why Match Explanations: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Relevance Scores: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ 💡 Book-specific improvements:
[4:56:13 PM] ℹ️ - Retry analysis when service is available
[4:56:13 PM] 📋 📖 ANALYSIS FOR: "LikeWar" - Score: 70%
[4:56:13 PM] ℹ️ ❌ Author Information: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Publishing Date: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Why Match Explanations: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ ❌ Relevance Scores: 70% - Analysis unavailable - API error
[4:56:13 PM] ℹ️ 💡 Book-specific improvements:
[4:56:13 PM] ℹ️ - Retry analysis when service is available
[4:56:13 PM] ℹ️ 📊 SUMMARY FEEDBACK:
[4:56:13 PM] ℹ️ • AI analysis service is temporarily overloaded
[4:56:13 PM] ℹ️ • Using fallback analysis with neutral scores
[4:56:13 PM] ℹ️ • Error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [429 Too Many Requests] You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.
* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 2
Please retry in 46.080714668s. [{"@type":"type.googleapis.com/google.rpc.QuotaFailure","violations":[{"quotaMetric":"generativelanguage.googleapis.com/generate_content_free_tier_requests","quotaId":"GenerateRequestsPerMinutePerProjectPerModel-FreeTier","quotaDimensions":{"location":"global","model":"gemini-2.5-pro"},"quotaValue":"2"}]},{"@type":"type.googleapis.com/google.rpc.Help","links":[{"description":"Learn more about Gemini API quotas","url":"https://ai.google.dev/gemini-api/docs/rate-limits"}]},{"@type":"type.googleapis.com/google.rpc.RetryInfo","retryDelay":"46s"}]
[4:56:13 PM] ❌ ❌ GEMINI AI VALIDATION FAILED: 70% relevance score (required: 80%)
[4:56:13 PM] ℹ️ Continuing execution due to soft assertion...
=== END LOGS ===